package com.lkd.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lkd.dto.VmDto;
import com.lkd.entity.VendingMachine;
import com.lkd.mapper.VendingMachineMapper;
import com.lkd.service.IVendingMachineService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lkd.vo.PageBean;
import com.lkd.vo.VmVo;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zzy
 * @since 2025-10-30
 */
@Service
public class VendingMachineServiceImpl extends ServiceImpl<VendingMachineMapper, VendingMachine> implements IVendingMachineService {

    /**
     * 设备搜索
     *
     * @param vmDto
     * @return
     */
    @Override
    public PageBean<VmVo> findList(VmDto vmDto) {
        // 1.设置分页参数
        Page<VendingMachine> page = new Page<>(vmDto.getPageIndex(), vmDto.getPageSize());

        Page<VmVo> list = baseMapper.AList(page, vmDto);

        return new PageBean<>(list);
    }

//        // 2.设置查询参数
//        this.baseMapper.findList(page,vmDto.getInnerCode());
//        // 3.分页查询
//        page = this.page(page, eq);
//         4.包装返回结果


}
